import request from '@/utils/request'

const prePath = "/unpack";

//新增
export function unpackOrderAdd(data) {
  return request({
      url: prePath + '/order',
      method : "post",
      data
  })
}

//获取拆包记录
export function getUnpackOrderCustomPage(data) {
    return request({
        url: prePath + '/order/customizeList/page',
        method : "post",
        data
    })
}
//删除拆包记录
export function deleteUnpackOrder(data) {
    return request({
      url: prePath + "/order",
      method: "delete",
      data
    });
  }
  //根据ID获取一条数据
  export function getUnpackById(id) {
    return request({
      url: prePath + "/order/" + id,
      method: "get"
    });
  }
  //获取拆包记录所有明细
export function getUnpackDetailAll(params) {
  return request({
    url: prePath + "/order/detail/all",
    method: "get",
    params
  });
}
export function getUnpackDetailCustomizeList(data) {
  return request({
    url: prePath + "/store/detail/customizeList/all",
    method: "post",
    data
  });
}

export function getUnpackDetailCustomizeListPage(data) {
  return request({
    url: prePath + "/store/detail/customizeList/page",
    method: "post",
    data
  });
}

export function getUnpackDetailGroups(data) {
  return request({
    url: prePath + "/store/detail/customizeGroups",
    method: "post",
    data
  });
}
//批量打印二维码
export function printQrCodeVO(data) {
  return request({
    url: prePath + "/store/detail/printQrCodeVO",
    method: "post",
    data
  });
}

//批量打印二维码
export function exportPrintQrCodeVO(data) {
  return request({
    url: prePath + "/export/detail/printQrCodeVO",
    method: "post",
    data
  });
}

//打印
export function getUnapckPrint(data) {
  return request({
    url: prePath + "/order/print",
    method: "post",
    data
  });
}

//导出excel
export function exportExcel(data) {
  return request({
    url: prePath + "/order/excel",
    method: "post",
    data,
    responseType: 'blob'
  });
}

//导出excel
export function exportExportExcel(data) {
  return request({
    url: prePath + "/export/detail/excel",
    method: "post",
    data,
    responseType: 'blob'
  });
}

//分组查询
export function getUnpackStoreDetailCustomizeGroups(data) {
  return request({
    url: prePath + "/store/detail/customizeGroups",
    method: "post",
    data
  });
}

export function getUnpackExportDetailGroups(data) {
  return request({
    url: prePath + "/export/detail/customizeGroups",
    method: "post",
    data
  });
}

export function getUnpackExportDetailCustomizeList(data) {
  return request({
    url: prePath + "/export/detail/customizeList/all",
    method: "post",
    data
  });
}

export function getUnpackExportDetailCustomizeListPage(data) {
  return request({
    url: prePath + "/export/detail/customizeList/page",
    method: "post",
    data
  });
}